home *** CD-ROM | disk | FTP | other *** search
Makefile | 1995-07-08 | 5.3 KB | 214 lines |
- /* Makefile for Lucid Widget Library
- Copyright (C) 1994 Lucid, Inc.
- Copyright (C) 1995 Tinker Systems and INS Engineering Corp.
- Copyright (C) 1994, 1995 Board of Trustees, University of Illinois
-
- This file is part of the Lucid Widget Library.
-
- The Lucid Widget Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- The Lucid Widget Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with GNU Emacs; see the file COPYING. If not, write to
- the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
-
- /* Some people use these in paths they define. We don't want their paths
- getting changed on them. */
- #undef sparc
- #undef sun
- #undef unix
- #undef sgi
- #undef NeXT
-
- srcdir=@srcdir@
- VPATH=@srcdir@
- C_SWITCH_X_SITE=@C_SWITCH_X_SITE@
- C_SWITCH_SITE=@C_SWITCH_SITE@
-
- SHELL=/bin/sh
-
- CC=@CC@
- CFLAGS=@CFLAGS@
- CPP=@CPP@
- RANLIB=@RANLIB@
-
- RM = rm -f
- AR = ar cq
- @SET_MAKE@
-
- #define THIS_IS_YMAKEFILE
- #define NOT_C_CODE
- #include "../src/config.h"
-
- #ifndef C_SWITCH_MACHINE
- #define C_SWITCH_MACHINE
- #endif
-
- #ifndef C_SWITCH_SYSTEM
- #define C_SWITCH_SYSTEM
- #endif
-
- #ifndef C_SWITCH_X_SYSTEM
- #define C_SWITCH_X_SYSTEM
- #endif
-
- #ifndef C_SWITCH_X_MACHINE
- #define C_SWITCH_X_MACHINE
- #endif
-
- #if defined (CONST_IS_LOSING)
- # define CONST_FLAG -DCONST_IS_LOSING
- #else
- # define CONST_FLAG
- #endif
-
- #if defined (LWLIB_MENUBARS_LUCID)
- # define LWLIB_MENUBARS -DMENUBARS_LUCID
- #else
- # if defined (LWLIB_MENUBARS_MOTIF)
- # define LWLIB_MENUBARS -DMENUBARS_MOTIF
- # else
- # define LWLIB_MENUBARS
- # endif
- #endif
-
- #if defined (LWLIB_SCROLLBARS_LUCID)
- # define LWLIB_SCROLLBARS -DSCROLLBARS_LUCID
- #else
- # if defined (LWLIB_SCROLLBARS_MOTIF)
- # define LWLIB_SCROLLBARS -DSCROLLBARS_MOTIF
- # else
- # if defined (LWLIB_SCROLLBARS_ATHENA)
- # define LWLIB_SCROLLBARS -DSCROLLBARS_ATHENA
- # else
- # define LWLIB_SCROLLBARS
- # endif
- # endif
- #endif
-
- #if defined (LWLIB_DIALOGS_MOTIF)
- # define LWLIB_DIALOGS -DDIALOGS_MOTIF
- #else
- # if defined (LWLIB_DIALOGS_ATHENA)
- # define LWLIB_DIALOGS -DDIALOGS_ATHENA
- # else
- # define LWLIB_DIALOGS
- # endif
- #endif
-
- #undef NEED_TOOLKIT
-
- /* If Motif was chosen as the tookit for anything, then
- LWLIB_USES_MOTIF should have gotten defined. */
- #if defined (LWLIB_USES_MOTIF)
- # ifndef NEED_TOOLKIT
- # define NEED_TOOLKIT
- # endif
- # define NEED_MOTIF -DNEED_MOTIF
- # define MOTIF_SRCS lwlib-Xm.c
- # define MOTIF_OBJS lwlib-Xm.o
- #else
- # define NEED_MOTIF
- # define MOTIF_SRCS
- # define MOTIF_OBJS
- #endif
-
- #if defined (LWLIB_MENUBARS_LUCID) || defined (LWLIB_SCROLLBARS_LUCID)
- # ifndef NEED_TOOLKIT
- # define NEED_TOOLKIT
- # endif
- # define NEED_LUCID -DNEED_LUCID
- # define LUCID_SRCS lwlib-Xlw.c xlwmenu.c xlwscrollbar.c
- # define LUCID_OBJS lwlib-Xlw.o xlwmenu.o xlwscrollbar.o
- #else
- # define NEED_LUCID
- # define LUCID_SRCS
- # define LUCID_OBJS
- #endif
-
- #if defined (LWLIB_SCROLLBARS_ATHENA) || defined (LWLIB_DIALOGS_ATHENA)
- # ifndef NEED_TOOLKIT
- # define NEED_TOOLKIT
- # endif
- # define NEED_ATHENA -DNEED_ATHENA
- # define ATHENA_SRCS lwlib-Xaw.c
- # define ATHENA_OBJS lwlib-Xaw.o
- #else
- # define NEED_ATHENA
- # define ATHENA_SRCS
- # define ATHENA_OBJS
- #endif
-
- #ifdef ENERGIZE
- EZ_OBJS = energize/blpsheet.o energize/build.o energize/classbr_ps.o \
- energize/ctreebr_ps.o energize/debuggerps.o \
- energize/editmode.o energize/leb_psheet.o \
- energize/projectdisp.o energize/projectps.o \
- energize/search.o energize/target.o
- ENERGIZEP = -DENERGIZE
- EZ_SUBDIR = ez_dialog
- #endif
-
- SRCS = lwlib.c MOTIF_SRCS LUCID_SRCS ATHENA_SRCS lwlib-utils.c $(EXT_SRCS) \
- lwlib-config.c
- OBJS = lwlib.o MOTIF_OBJS LUCID_OBJS ATHENA_OBJS lwlib-utils.o $(EXT_OBJS) \
- lwlib-config.o $(EZ_OBJS)
-
- #ifdef NEED_TOOLKIT
- all:: $(EZ_SUBDIR) liblw.a
- #else
- all::
- #endif
-
- ALL_CFLAGS = -I. C_SWITCH_MACHINE C_SWITCH_SITE C_SWITCH_X_SITE \
- C_SWITCH_X_MACHINE C_SWITCH_X_SYSTEM \
- C_SWITCH_SYSTEM NEED_LUCID NEED_MOTIF NEED_ATHENA \
- LWLIB_MENUBARS LWLIB_SCROLLBARS LWLIB_DIALOGS \
- $(ENERGIZEP) ${CFLAGS} CONST_FLAG
- .c.o:
- $(CC) -c $(CPPFLAGS) $(ALL_CFLAGS) $<
-
- liblw.a: $(OBJS)
- $(RM) $@
- $(AR) $@ $(OBJS)
- -if [ -n $(RANLIB) ]; then \
- $(RANLIB) $@; \
- fi
-
- #ifdef ENERGIZE
- ez_dialog:
- cd energize ; $(MAKE) $(MFLAGS)
- #endif
-
- FRC.mostlyclean:
- mostlyclean: FRC.mostlyclean
- rm -f liblw.a liblw_pure_*.a *.o
- clean: mostlyclean
- #ifdef ENERGIZE
- cd energize ; $(MAKE) $(MFLAGS) clean
- #endif
- distclean: clean
- rm -f Makefile Makefile.in .pure
- realclean: distclean
- extraclean: distclean
- -rm -f *~ \#* m/?*~ s/?*~
-
-
- lwlib-config.o: lwlib.h ../src/config.h
- lwlib-Xaw.o: lwlib.h lwlib-internal.h lwlib-Xaw.h ../src/config.h
- lwlib-Xlw.o: lwlib.h lwlib-internal.h lwlib-Xlw.h xlwmenu.h ../src/config.h
- lwlib-Xm.o: lwlib.h lwlib-internal.h lwlib-utils.h lwlib-Xm.h
- lwlib-Xm.o: ../src/config.h
- lwlib-utils.o: lwlib-utils.h ../src/config.h
- lwlib.o: lwlib.h lwlib-internal.h lwlib-utils.h ../src/config.h
- lwlib.o: lwlib-Xlw.h lwlib-Xm.h lwlib-Xaw.h ../src/config.h
- xlwmenu.o: lwlib.h xlwmenu.h xlwmenuP.h ../src/config.h
- xlwscrollbar.o: lwlib.h xlwscrollbar.h xlwscrollbarP.h ../src/config.h
-